Laten we eerst eens kijken naar een eenvoudig voorbeeld waar er alleen maar een lijn is. Als eerste bepalen we de lijnpositie in de doel afbeelding. Dit is gewoon een gewogen gemiddelde van de lijn's positie in het eerste en het laatste beeld. Bereken dan de transformatie die is gedaan om de doellijn in de bron te maken. Deze transformatie is gedaan door roteren, verschuiven en schalen van de lijn. Als je enige algebra kennis hebt, kan je weten dat dit duidelijk gespecificeerd is als een transformatiematrix M. Vermenigvuldig bestemmingspunt X met de matrix om het bronpunt te krijgen waarmee X ge-sampled kan worden.
Als je meer dan een lijn hebt, doe je bovenstaande berekening voor elke lijn en zo krijg je de punten X1' X2' X3' enz. Bereken nu de afstand van het X punt naar elke lijn en gebruik dat als gewicht wi = 1 / (afstand * afstand). Bereken het gewogen gemiddelde X' van de Xi' punten en sample dat punt. Herhaal dit voor alle punten in de doelafbeelding.
Noot van de vertaler:
Bovenstaande tekst overstijgt mijn mathematisch kennisniveau. Om het risico te vermijden dat mijn vertaling geleid tot een ogenschijnlijk interessant stukje tekst, maar voor een kenner een gatenkaas aan onzin is, volgt hier de oorspronkelijke (Engelse) tekst:
The idea is: For a point X in the destination image (the one were trying to calculate), find the point X' to sample in the source image.
Lets first look at a simple case where there is only one line. First we get the lines position in the destination image. This is just a weighted average of the line's position in the first and last image. Then calculate the transformation that is done to make the destination line into the source. This transformation is made up by a rotation, translation and a scaling of the line. If you've read some algebra you know that this is effectively specified as a transformation matrix M. Multiply the destination point X with the matrix to get the source point to samlpe X'.
If you have more then one line you do the above calculation for each line and get points X1' X2' X3' and so on. Now calculate the distance from the X point to each line and use that as a weight wi = 1 / (distance * distance). Find the weighted average X' of the Xi' points and sample that point. Repeat all this for all points in the destination image.